The present invention relates to a method and apparatus for inputting data to a data destination. In particular the present invention relates to a system in which an item of information is generated at a data source and transmitted to the data destination in a data packet.
An example of a system of this type is an interactive home entertainment games console. A player presses buttons on a handset, causing the handset to generate game-play data which is transmitted to a central game controller. Some data transmission protocols make it impossible to transmit the data at the time the button is pressed, and as a result the central game controller is unable to determine exactly when a button has been pressed. For example, referring to FIG. 5, a handset is configured to transmit data packets during a series of equally spaced time slots 10. A player presses a button at 11 and 12. However the game-play data is only transmitted to the game controller at 13 and 14 during the next time slots 15, 16. The exact time when the button was pressed can be very important, for instance in a single player game to determine whether the player has hit a moving target.
One way to avoid the problems discussed above is to have a synchronised real-time clock in the handset, to register the exact time that a button was pressed and to include this information as an absolute time stamp in the data packet. A problem with this approach is that synchronisation of the real-time clock adds computational complexity and also requires a two-way link between the game controller and the handset. This adds to the cost of components.
In accordance with a first aspect of the present invention there is provided a method of inputting one or more items of information to a data destination, the method comprising generating the item(s) of information at one or more data sources; and for each item of information transmitting the item of information to the data destination in a data packet; calculating a time stamp value in accordance with the time delay between generating the item of information and transmitting the data packet; encoding the time stamp value in the data packet; decoding the data packet at the data destination to retrieve the time stamp value; and calculating the time delay associated with the data packet in accordance with the retrieved time stamp value.
In contrast with the conventional approach the present invention generates a relative time stamp value which indicates the time delay between generating and transmitting the item(s) of information. As a result no synchronisation is needed between the data source and the data destination.
The retrieved time stamp value can then be used to calculate the exact time when the item of information was generated. Where a plurality of items of information are generated, their order of generation can be calculated from the time stamp values.
The problem of calculating the order of generation of items of information is particularly acute in a system with a plurality of data sources. Referring to FIG. 6, four synchronised handsets have time-division multiplexed transmission slots, ie. a first handset transmits during time slots 1; a second handset transmits during time slots 2; a third handset transmits during time slots 3; and a fourth handset transmits during time slots 4. Buttons on the first, second, third and fourth handsets are pressed at 1xe2x80x2, 2xe2x80x2, 3xe2x80x2 and 4xe2x80x2 respectively. However the message cannot be transmitted to the game controller until the time slot allocated to that handset occurs. Therefore the data packets from the first, second, third and fourth handsets are received at 1xe2x80x3, 2xe2x80x3, 3xe2x80x3 and 4xe2x80x3 respectively. It can be seen that the order of receipt (ie. 3xe2x80x3, 4xe2x80x3, 1xe2x80x3, 2xe2x80x3) is different from the order in which the buttons are pushed (ie. 4xe2x80x2, 3xe2x80x2, 2xe2x80x2, 1xe2x80x2). This leads the game controller to make the wrong decision as to who pressed a button first, for instance in a tie-break situation.
Now referring to FIG. 7, in this case a button on the third handset is pressed at 3xe2x80x3, and a button on the first handset is pressed later at 1xe2x80x2. However interference causes the first message 3xe2x80x3 to be lost. The message is repeated at 3xe2x80x2xe2x80x3 (ie. at the next available time slot) but is out of order with the message 1xe2x80x2 from the first handset.
Therefore in a preferred embodiment a plurality of items of information are input to the data destination from a plurality of data sources. Typically the data packets from each data source are transmitted over a common data channel (e.g. a common infra-red link).
Typically each data packet is transmitted during a predetermined time slot. In one example, the data source is allocated a series of time slots, each successive time slot being spaced by a repetition period. If the repetition period is known and substantially constant, then this enables the resolution of the time stamp value to be chosen accordingly. In one example the resolution of the time stamp value is chosen to be half the repetition period.
The data packets may be transmitted in synchronised time slots (eg. of the type shown in FIG. 5). However preferably the method further comprises:
transmitting each item of information from each data source as a series of data packets, each data packet being separated from adjacent data packets transmitted by the same data source by a repetition period, the repetition period of each data source being different from the repetition periods of the other data sources; and
repeatedly transmitting each item of information from the same data source in at least N adjacent data packets, where N is the number of data sources, in order to ensure that at least one of the N adjacent data packets is received at the data destination without overlapping with data packets from the other data sources.
This enables multiple unsynchronised data sources to transmit over a common data channel, significantly reducing the complexity, and hence cost, of the system. In general each data packet has a different time stamp value to the other at least Nxe2x88x921 adjacent data packets.
The method may be employed in any communication system in which time stamping is required. However in a preferred example the item(s) of data comprise(s) game-play data, the data source(s) comprise(s) one or more game-play input devices which generate the game-play data, and the data destination comprises a game-play controller.
In accordance with a second aspect of the present invention there is provided a system comprising a data destination having a receiver for receiving data; and one or more data sources each comprising means for generating an item of information, a transmitter for transmitting the item of information to the data destination, a processor for controlling the transmitter such that the transmitter transmits the item of information to the data destination in a data packet, means for calculating a time stamp value in accordance with the time delay between generating the item of information and transmitting the data packet, and an encoder for encoding the time stamp value in the data packet; wherein the data destination further comprises a decoder for decoding the data packet to retrieve the time stamp value; and means for calculating the time delay associated with the data packet in accordance with the retrieved time stamp value.
Typically the means for calculating a time stamp value comprises a time stamp counter which counts at a predetermined rate during the time delay to generate a count value. The predetermined rate can then be selected in accordance with the required resolution of the time stamp value.
The data source(s) may communicate with the data destination via a two-way link in order to provide synchronisation. However this creates additional expense. Therefore preferably the data destination is unable to transmit synchronisation information to the data source(s), and the data source(s) is/are unable to receive synchronisation information from the data destination. This enables much cheaper components to be used.